#run on R version 3.0.1 (2013-05-16)
library(foreign)
library(xlsx)
library(countrycode)
library(Zelig)
library(apsrtable)

#### reas Alesina and Dollar Data
#ad<-read.xlsx("dataset.xls",skip=3, header=T,
# na.strings=c("#N/A","NA"),1)

#### reads similarity measures with and without consensus votes
# load("unvt-preparation04b-cons.Rda")
#agree.cons<-sim
#rm(sim)
#load("unvt-preparation04a-nocons.Rda")
#agree<-sim

# here data is read in
#S.x.x: us consensus
#S.y.x: jp consensus
#S.x.y: us withoutconsensus
#S.y.y: jp withoutconsensus


load(file="e:/info/data/adunvtt.Rda")

#democracy variable is inverted
adunvtt$GASPOLr<-8-adunvtt$GASPOL

#Figure 4: Ritter and Signorino�s S vs. proportion of common votes

#pdf("cvasmisf1.pdf")
png("cvasmisf1.png")
par(mfrow=c(1,2))
plot(adunvtt$FRUS,adunvtt$S.x.y,ylim=c(-1,1),xlab="proportion of common votes"
 ,ylab="S with consensus votes")
plot(adunvtt$FRUS,adunvtt$S.x.x,ylim=c(-1,1),xlab="proportion of common votes"
 ,ylab="S with consensus votes")

dev.off()


#Figure 5: Cohen�s ? vs. proportion of common votes

#pdf("cvasmisf2.pdf")
png("cvasmisf2.png")
par(mfrow=c(1,2))
plot(adunvtt$FRUS,adunvtt$K.x.y,ylim=c(-1,1),xlab="proportion of common votes"
 ,ylab="Kappa with consensus votes")
plot(adunvtt$FRUS,adunvtt$K.x.x,ylim=c(-1,1),xlab="proportion of common votes"
 ,ylab="Kappa with consensus votes")

dev.off()

#Table 5: Replication of Alesina and Dollar (2000), bilateral aid by US
#(linear regression with White robust standard errors) 

zus1.out  <-  zelig(log(ODAUSAP1)~-1+LNRGDPPC+OPEN+
 GASPOLr+FRUSA+COLUSA+COLNUSA+DUMEGY+DUMISR+Musl+Romcath+Hindu+DUM70+DUM75+DUM80+DUM85+DUM90
, data=adunvtt,  model  =  "ls", method= "vcovHC")

zus1b.out  <-  zelig(log(ODAUSAP1)~-1+LNRGDPPC+OPEN+
 GASPOLr+FRUSA+COLUSA+COLNUSA+DUMEGY+DUMISR+Musl+Romcath+Hindu+DUM70+DUM75+DUM80+DUM85+DUM90
, data=adunvtt,  model  =  "ls", method= "vcovHC")

zus2.out  <-  zelig(log(ODAUSAP1)~-1+LNRGDPPC+OPEN+
 GASPOLr+S.x.x+COLUSA+COLNUSA+DUMEGY+DUMISR+Musl+Romcath+Hindu+DUM70+DUM75+DUM80+DUM85+DUM90
, data=adunvtt,  model  =  "ls", method= "vcovHC")

zus3.out  <-  zelig(log(ODAUSAP1)~-1+LNRGDPPC+OPEN+
 GASPOLr+S.x.y+COLUSA+COLNUSA+DUMEGY+DUMISR+Musl+Romcath+Hindu+DUM70+DUM75+DUM80+DUM85+DUM90
, data=adunvtt,  model  =  "ls", method= "vcovHC")

zus4.out  <-  zelig(log(ODAUSAP1)~-1+LNRGDPPC+OPEN+
 GASPOLr+K.x.x+COLUSA+COLNUSA+DUMEGY+DUMISR+Musl+Romcath+Hindu+DUM70+DUM75+DUM80+DUM85+DUM90
, data=adunvtt,  model  =  "ls", method= "vcovHC")

zus5.out  <-  zelig(log(ODAUSAP1)~-1+LNRGDPPC+OPEN+
 GASPOLr+K.x.y+COLUSA+COLNUSA+DUMEGY+DUMISR+Musl+Romcath+Hindu+DUM70+DUM75+DUM80+DUM85+DUM90
, data=adunvtt,  model  =  "ls", method= "vcovHC")

zus.outo<-zus1.out


## this stores Alesina and Dollar's coefficients
for (i in 1: length(zus.outo$result[1]$coefficients)){
zus.outo$result[1]$coefficients[i]<-c(1.84
,1.30 ,0.57,0.06 ,0.39,0.08,40.09 ,5.04,0.01 ,0.01,-0.00,NA,NA,NA,NA,NA)[i]
}

apsrtable(zus.outo,zus1.out,zus2.out,zus4.out,zus3.out,zus5.out,digits=3)


#table A1 total bilateral aid


 z.out  <-  zelig(LNOECD~-1+LNRGDPPC+LNRGDPPC.1+LNPOP+LNPOPSQ+OPEN+
 GASPOLr+FRUSA+FRJPN+LNCOLS+DUMEGY+DUMISR+Musl+Romcath+Hindu+DUM70+DUM75+DUM80+DUM85+DUM90
, data=adunvtt,  model  =  "ls", method= "vcovHC")

 z2.out  <-  zelig(LNOECD~-1+LNRGDPPC+LNRGDPPC.1+LNPOP+LNPOPSQ+OPEN+
 GASPOLr+S.x.x+S.y.x+LNCOLS+DUMEGY+DUMISR+Musl+Romcath+Hindu+DUM70+DUM75+DUM80+DUM85+DUM90
, data=adunvtt,  model  =  "ls", method= "vcovHC")

 z3.out  <-  zelig(LNOECD~-1+LNRGDPPC+LNRGDPPC.1+LNPOP+LNPOPSQ+OPEN+
 GASPOLr+S.x.y+S.y.y+LNCOLS+DUMEGY+DUMISR+Musl+Romcath+Hindu+DUM70+DUM75+DUM80+DUM85+DUM90
, data=adunvtt,  model  =  "ls", method= "vcovHC")

 z4.out  <-  zelig(LNOECD~-1+LNRGDPPC+LNRGDPPC.1+LNPOP+LNPOPSQ+OPEN+
 GASPOLr+K.x.x+K.y.x+LNCOLS+DUMEGY+DUMISR+Musl+Romcath+Hindu+DUM70+DUM75+DUM80+DUM85+DUM90
, data=adunvtt,  model  =  "ls", method= "vcovHC")

 z5.out  <-  zelig(LNOECD~-1+LNRGDPPC+LNRGDPPC.1+LNPOP+LNPOPSQ+OPEN+
 GASPOLr+K.x.y+K.y.y+LNCOLS+DUMEGY+DUMISR+Musl+Romcath+Hindu+DUM70+DUM75+DUM80+DUM85+DUM90
, data=adunvtt,  model  =  "ls", method= "vcovHC")

z.outo<-z.out

for (i in 1: length(z.outo$result[1]$coefficients)){
z.outo$result[1]$coefficients[i]<-c(6.563,-0.491,1.568,-0.035,0.383,0.142,-0.006,0.153,
 0.291,1.545,6.473,-0.001,0.001,-0.009,NA,NA,NA,NA,NA)[i]
}
apsrtable(z.outo,z.out,z2.out,z4.out,z3.out,z5.out,digits=3)


###table A2 total bilateral aid important resolutions
load( file="e:/info/data/adunvtti.Rda")
adunvtti$GASPOLr<-8-adunvtti$GASPOL

 z.out  <-  zelig(LNOECD~-1+LNRGDPPC+LNRGDPPC.1+LNPOP+LNPOPSQ+OPEN+
 GASPOLr+FRUSA+FRJPN+LNCOLS+DUMEGY+DUMISR+Musl+Romcath+Hindu+DUM70+DUM75+DUM80+DUM85+DUM90
, data=adunvtti[adunvtti$X.2>1980,],  model  =  "ls", method= "vcovHC")

 z2.out  <-  zelig(LNOECD~-1+LNRGDPPC+LNRGDPPC.1+LNPOP+LNPOPSQ+OPEN+
 GASPOLr+S.x.x+S.y.x+LNCOLS+DUMEGY+DUMISR+Musl+Romcath+Hindu+DUM70+DUM75+DUM80+DUM85+DUM90
, data=adunvtti[adunvtti$dec.x.x>1980,],  model  =  "ls", method= "vcovHC")


 z3.out  <-  zelig(LNOECD~-1+LNRGDPPC+LNRGDPPC.1+LNPOP+LNPOPSQ+OPEN+
 GASPOLr+S.x.y+S.y.y+LNCOLS+DUMEGY+DUMISR+Musl+Romcath+Hindu+DUM70+DUM75+DUM80+DUM85+DUM90
, data=adunvtti[adunvtti$X.2>1980,],  model  =  "ls", method= "vcovHC")

 z4.out  <-  zelig(LNOECD~-1+LNRGDPPC+LNRGDPPC.1+LNPOP+LNPOPSQ+OPEN+
 GASPOLr+K.x.x+K.y.x+LNCOLS+DUMEGY+DUMISR+Musl+Romcath+Hindu+DUM70+DUM75+DUM80+DUM85+DUM90
, data=adunvtti[adunvtti$dec.x.x>1980,],  model  =  "ls", method= "vcovHC")


 z5.out  <-  zelig(LNOECD~-1+LNRGDPPC+LNRGDPPC.1+LNPOP+LNPOPSQ+OPEN+
 GASPOLr+K.x.y+K.y.y+LNCOLS+DUMEGY+DUMISR+Musl+Romcath+Hindu+DUM70+DUM75+DUM80+DUM85+DUM90
, data=adunvtti[adunvtti$dec.x.x>1980,],  model  =  "ls", method= "vcovHC")


z.outo<-z.out

for (i in 1: length(z.outo$result[1]$coefficients)){
z.outo$result[1]$coefficients[i]<-c(6.563,-0.491,1.568,-0.035,0.383,0.142,-0.006,0.153,
 0.291,1.545,6.473,-0.001,0.001,-0.009,NA,NA,NA,NA,NA)[i]
}
apsrtable(z.outo,z.out,z2.out,z4.out,z3.out,z5.out,digits=3)

###Table A3: Replication of Alesina and Dollar (2000), total bilateral aid (other chance-corrected indices I, linear regression with White robust standard errors)
### same for Scott's P and uniform marginals for appendix
 z.out  <-  zelig(LNOECD~-1+LNRGDPPC+LNRGDPPC.1+LNPOP+LNPOPSQ+OPEN+
 GASPOLr+FRUSA+FRJPN+LNCOLS+DUMEGY+DUMISR+Musl+Romcath+Hindu+DUM70+DUM75+DUM80+DUM85+DUM90
, data=adunvtt,  model  =  "ls", method= "vcovHC")

 z2.out  <-  zelig(LNOECD~-1+LNRGDPPC+LNRGDPPC.1+LNPOP+LNPOPSQ+OPEN+
 GASPOLr+P.x.x+P.y.x+LNCOLS+DUMEGY+DUMISR+Musl+Romcath+Hindu+DUM70+DUM75+DUM80+DUM85+DUM90
, data=adunvtt,  model  =  "ls", method= "vcovHC")

 z3.out  <-  zelig(LNOECD~-1+LNRGDPPC+LNRGDPPC.1+LNPOP+LNPOPSQ+OPEN+
 GASPOLr+P.x.y+P.y.y+LNCOLS+DUMEGY+DUMISR+Musl+Romcath+Hindu+DUM70+DUM75+DUM80+DUM85+DUM90
, data=adunvtt,  model  =  "ls", method= "vcovHC")

 z4.out  <-  zelig(LNOECD~-1+LNRGDPPC+LNRGDPPC.1+LNPOP+LNPOPSQ+OPEN+
 GASPOLr+U.x.x+U.y.x+LNCOLS+DUMEGY+DUMISR+Musl+Romcath+Hindu+DUM70+DUM75+DUM80+DUM85+DUM90
, data=adunvtt,  model  =  "ls", method= "vcovHC")

 z5.out  <-  zelig(LNOECD~-1+LNRGDPPC+LNRGDPPC.1+LNPOP+LNPOPSQ+OPEN+
 GASPOLr+U.x.y+U.y.y+LNCOLS+DUMEGY+DUMISR+Musl+Romcath+Hindu+DUM70+DUM75+DUM80+DUM85+DUM90
, data=adunvtt,  model  =  "ls", method= "vcovHC")

z.outo<-z.out

for (i in 1: length(z.outo$result[1]$coefficients)){
z.outo$result[1]$coefficients[i]<-c(6.563,-0.491,1.568,-0.035,0.383,0.142,-0.006,0.153,
 0.291,1.545,6.473,-0.001,0.001,-0.009,NA,NA,NA,NA,NA)[i]
}
apsrtable(z.outo,z.out,z2.out,z4.out,z3.out,z5.out,digits=3,
coef.names=c("Log GDP per capita","Log GDP per capita^2",
"Log population","Log population^2","Economic openness","Democracy",
"Friend of USA (UNGA voting)","Friend of Japan (UNGA voting)",
"Log years as colony","Egypt","Israel","Percent muslims","Percent catholics",
"Percent other religions (Hindu)","1970-1974","1975-1979","1980-1984","1985-1989",
"1990-1994","P","P","U","U","P","P","U","U")
)

###Table A4: Replication of Alesina and Dollar (2000), total bilateral aid (other chance-corrected indices II, linear regression with White robust standard errors)
### same for country and resolution marginals for appendix
 z.out  <-  zelig(LNOECD~-1+LNRGDPPC+LNRGDPPC.1+LNPOP+LNPOPSQ+OPEN+
 GASPOLr+FRUSA+FRJPN+LNCOLS+DUMEGY+DUMISR+Musl+Romcath+Hindu+DUM70+DUM75+DUM80+DUM85+DUM90
, data=adunvtt,  model  =  "ls", method= "vcovHC")

 z2.out  <-  zelig(LNOECD~-1+LNRGDPPC+LNRGDPPC.1+LNPOP+LNPOPSQ+OPEN+
 GASPOLr+C.x.x+C.y.x+LNCOLS+DUMEGY+DUMISR+Musl+Romcath+Hindu+DUM70+DUM75+DUM80+DUM85+DUM90
, data=adunvtt,  model  =  "ls", method= "vcovHC")

 z3.out  <-  zelig(LNOECD~-1+LNRGDPPC+LNRGDPPC.1+LNPOP+LNPOPSQ+OPEN+
 GASPOLr+C.x.y+C.y.y+LNCOLS+DUMEGY+DUMISR+Musl+Romcath+Hindu+DUM70+DUM75+DUM80+DUM85+DUM90
, data=adunvtt,  model  =  "ls", method= "vcovHC")

 z4.out  <-  zelig(LNOECD~-1+LNRGDPPC+LNRGDPPC.1+LNPOP+LNPOPSQ+OPEN+
 GASPOLr+R.x.x+R.y.x+LNCOLS+DUMEGY+DUMISR+Musl+Romcath+Hindu+DUM70+DUM75+DUM80+DUM85+DUM90
, data=adunvtt,  model  =  "ls", method= "vcovHC")

 z5.out  <-  zelig(LNOECD~-1+LNRGDPPC+LNRGDPPC.1+LNPOP+LNPOPSQ+OPEN+
 GASPOLr+R.x.y+R.y.y+LNCOLS+DUMEGY+DUMISR+Musl+Romcath+Hindu+DUM70+DUM75+DUM80+DUM85+DUM90
, data=adunvtt,  model  =  "ls", method= "vcovHC")

z.outo<-z.out

for (i in 1: length(z.outo$result[1]$coefficients)){
z.outo$result[1]$coefficients[i]<-c(6.563,-0.491,1.568,-0.035,0.383,0.142,-0.006,0.153,
 0.291,1.545,6.473,-0.001,0.001,-0.009,NA,NA,NA,NA,NA)[i]
}
apsrtable(z.outo,z.out,z2.out,z4.out,z3.out,z5.out,digits=3,
coef.names=c("Log GDP per capita","Log GDP per capita^2",
"Log population","Log population^2","Economic openness","Democracy",
"Friend of USA (UNGA voting)","Friend of Japan (UNGA voting)",
"Log years as colony","Egypt","Israel","Percent muslims","Percent catholics",
"Percent other religions (Hindu)","1970-1974","1975-1979","1980-1984","1985-1989",
"1990-1994","C","C","R","R","C","C","R","R")
)

###Table A9: Replication of Alesina and Dollar (2000):  bilateral aid USA (without time-dummies, linear regression with White robust standard errors)

zus.out  <-  zelig(log(ODAUSAP1)~-1+LNRGDPPC+OPEN+
 GASPOLr+FRUSA+COLUSA+COLNUSA+DUMEGY+DUMISR+Musl+Romcath+Hindu
, data=adunvtt,  model  =  "ls", method= "vcovHC")

zus1.out  <-  zelig(log(ODAUSAP1)~-1+LNRGDPPC+OPEN+
 GASPOLr+FRUSA+COLUSA+COLNUSA+DUMEGY+DUMISR+Musl+Romcath+Hindu
, data=adunvtt,  model  =  "ls", method= "vcovHC")

zus1b.out  <-  zelig(log(ODAUSAP1)~-1+LNRGDPPC+OPEN+
 GASPOLr+FRUSA+COLUSA+COLNUSA+DUMEGY+DUMISR+Musl+Romcath+Hindu
, data=adunvtt,  model  =  "ls", method= "vcovHC")

zus2.out  <-  zelig(log(ODAUSAP1)~-1+LNRGDPPC+OPEN+
 GASPOLr+S.x.x+COLUSA+COLNUSA+DUMEGY+DUMISR+Musl+Romcath+Hindu
, data=adunvtt,  model  =  "ls", method= "vcovHC")

zus3.out  <-  zelig(log(ODAUSAP1)~-1+LNRGDPPC+OPEN+
 GASPOLr+S.x.y+COLUSA+COLNUSA+DUMEGY+DUMISR+Musl+Romcath+Hindu
, data=adunvtt,  model  =  "ls", method= "vcovHC")

zus4.out  <-  zelig(log(ODAUSAP1)~-1+LNRGDPPC+OPEN+
 GASPOLr+K.x.x+COLUSA+COLNUSA+DUMEGY+DUMISR+Musl+Romcath+Hindu
, data=adunvtt,  model  =  "ls", method= "vcovHC")

zus5.out  <-  zelig(log(ODAUSAP1)~-1+LNRGDPPC+OPEN+
 GASPOLr+K.x.y+COLUSA+COLNUSA+DUMEGY+DUMISR+Musl+Romcath+Hindu
, data=adunvtt,  model  =  "ls", method= "vcovHC")

zus.outo<-zus.out

## this stores Alesina and Dollar's coefficients
for (i in 1: length(zus.outo$result[1]$coefficients)){
zus.outo$result[1]$coefficients[i]<-c(1.84
,1.30 ,0.57,0.06 ,0.39,0.08,40.09 ,5.04,0.01 ,0.01,-0.00,NA,NA,NA,NA,NA)[i]
}

apsrtable(zus.outo,zus1.out,zus1b.out,zus2.out,zus4.out,zus3.out,zus5.out,digits=3)


###Table A10: Replication of Alesina and Dollar (2000):  total bilateral aid (without time-dummies, linear regression with White robust standard errors)

 z.out  <-  zelig(LNOECD~-1+LNRGDPPC+LNRGDPPC.1+LNPOP+LNPOPSQ+OPEN+
 GASPOLr+FRUSA+FRJPN+LNCOLS+DUMEGY+DUMISR+Musl+Romcath+Hindu
, data=adunvtt,  model  =  "ls", method= "vcovHC")

 z2.out  <-  zelig(LNOECD~-1+LNRGDPPC+LNRGDPPC.1+LNPOP+LNPOPSQ+OPEN+
 GASPOLr+S.x.x+S.y.x+LNCOLS+DUMEGY+DUMISR+Musl+Romcath+Hindu
, data=adunvtt,  model  =  "ls", method= "vcovHC")

 z3.out  <-  zelig(LNOECD~-1+LNRGDPPC+LNRGDPPC.1+LNPOP+LNPOPSQ+OPEN+
 GASPOLr+S.x.y+S.y.y+LNCOLS+DUMEGY+DUMISR+Musl+Romcath+Hindu
, data=adunvtt,  model  =  "ls", method= "vcovHC")

 z4.out  <-  zelig(LNOECD~-1+LNRGDPPC+LNRGDPPC.1+LNPOP+LNPOPSQ+OPEN+
 GASPOLr+K.x.x+K.y.x+LNCOLS+DUMEGY+DUMISR+Musl+Romcath+Hindu
, data=adunvtt,  model  =  "ls", method= "vcovHC")

 z5.out  <-  zelig(LNOECD~-1+LNRGDPPC+LNRGDPPC.1+LNPOP+LNPOPSQ+OPEN+
 GASPOLr+K.x.y+K.y.y+LNCOLS+DUMEGY+DUMISR+Musl+Romcath+Hindu
, data=adunvtt,  model  =  "ls", method= "vcovHC")

z.outo<-z.out

for (i in 1: length(z.outo$result[1]$coefficients)){
z.outo$result[1]$coefficients[i]<-c(6.563,-0.491,1.568,-0.035,0.383,0.142,-0.006,0.153,
 0.291,1.545,6.473,-0.001,0.001,-0.009,NA,NA,NA,NA,NA)[i]
}
apsrtable(z.outo,z.out,z2.out,z4.out,z3.out,z5.out,digits=3)


load(file="e:/info/data/adunvtt1.Rda")
adunvtt1<-adunvtt
load(file="e:/info/data/adunvtt2.Rda")
adunvtt2<-adunvtt
load(file="e:/info/data/adunvtt3.Rda")
adunvtt3<-adunvtt
load(file="e:/info/data/adunvtt4.Rda")
adunvtt4<-adunvtt
load(file="e:/info/data/adunvtt5.Rda")
adunvtt5<-adunvtt

adunvtt1$GASPOLr<-8-adunvtt1$GASPOL

adunvtt2$GASPOLr<-8-adunvtt2$GASPOL

adunvtt3$GASPOLr<-8-adunvtt3$GASPOL

adunvtt4$GASPOLr<-8-adunvtt4$GASPOL

adunvtt5$GASPOLr<-8-adunvtt5$GASPOL

###Table A5: Replication of Alesina and Dollar (2000), total bilateral aid (with non-recorded votes, linear regression with White robust standard errors)

 z.out  <-  zelig(LNOECD~-1+LNRGDPPC+LNRGDPPC.1+LNPOP+LNPOPSQ+OPEN+
 GASPOLr+FRUSA+FRJPN+LNCOLS+DUMEGY+DUMISR+Musl+Romcath+Hindu+DUM70+DUM75+DUM80+DUM85+DUM90
, data=mi(adunvtt1,adunvtt2,adunvtt3,adunvtt4,adunvtt5),  model  =  "ls", method= "vcovHC")

 z2.out  <-  zelig(LNOECD~-1+LNRGDPPC+LNRGDPPC.1+LNPOP+LNPOPSQ+OPEN+
 GASPOLr+S.x.x+S.y.x+LNCOLS+DUMEGY+DUMISR+Musl+Romcath+Hindu+DUM70+DUM75+DUM80+DUM85+DUM90
, data=mi(adunvtt1,adunvtt2,adunvtt3,adunvtt4,adunvtt5),  model  =  "ls", method= "vcovHC")

 z3.out  <-  zelig(LNOECD~-1+LNRGDPPC+LNRGDPPC.1+LNPOP+LNPOPSQ+OPEN+
 GASPOLr+S.x.y+S.y.y+LNCOLS+DUMEGY+DUMISR+Musl+Romcath+Hindu+DUM70+DUM75+DUM80+DUM85+DUM90
, data=mi(adunvtt1,adunvtt2,adunvtt3,adunvtt4,adunvtt5),  model  =  "ls", method= "vcovHC")

 z4.out  <-  zelig(LNOECD~-1+LNRGDPPC+LNRGDPPC.1+LNPOP+LNPOPSQ+OPEN+
 GASPOLr+K.x.x+K.y.x+LNCOLS+DUMEGY+DUMISR+Musl+Romcath+Hindu+DUM70+DUM75+DUM80+DUM85+DUM90
, data=mi(adunvtt1,adunvtt2,adunvtt3,adunvtt4,adunvtt5),  model  =  "ls", method= "vcovHC")

 z5.out  <-  zelig(LNOECD~-1+LNRGDPPC+LNRGDPPC.1+LNPOP+LNPOPSQ+OPEN+
 GASPOLr+K.x.y+K.y.y+LNCOLS+DUMEGY+DUMISR+Musl+Romcath+Hindu+DUM70+DUM75+DUM80+DUM85+DUM90
, data=mi(adunvtt1,adunvtt2,adunvtt3,adunvtt4,adunvtt5),  model  =  "ls", method= "vcovHC")

z.outo<-z.out

for (i in 1: length(z.outo$result[1]$coefficients)){
z.outo$result[1]$coefficients[i]<-c(6.563,-0.491,1.568,-0.035,0.383,0.142,-0.006,0.153,
 0.291,1.545,6.473,-0.001,0.001,-0.009,NA,NA,NA,NA,NA)[i]
}
summary(z.outo,z.out,z2.out,z4.out,z3.out,z5.out,digits=3)

summary(z.out)
summary(z2.out)
summary(z3.out)
summary(z4.out)
summary(z5.out)


#Table A6: Replication of Alesina and Dollar (2000), bilateral aid by US (with non-recorded votes, linear regression with White robust standard errors)

zus1.out  <-  zelig(log(ODAUSAP1)~-1+LNRGDPPC+OPEN+
 GASPOLr+FRUSA+COLUSA+COLNUSA+DUMEGY+DUMISR+Musl+Romcath+Hindu+DUM70+DUM75+DUM80+DUM85+DUM90
, data=mi(adunvtt1,adunvtt2,adunvtt3,adunvtt4,adunvtt5),  model  =  "ls", method= "vcovHC")

zus2.out  <-  zelig(log(ODAUSAP1)~-1+LNRGDPPC+OPEN+
 GASPOLr+S.x.x+COLUSA+COLNUSA+DUMEGY+DUMISR+Musl+Romcath+Hindu+DUM70+DUM75+DUM80+DUM85+DUM90
, data=mi(adunvtt1,adunvtt2,adunvtt3,adunvtt4,adunvtt5),  model  =  "ls", method= "vcovHC")

zus3.out  <-  zelig(log(ODAUSAP1)~-1+LNRGDPPC+OPEN+
 GASPOLr+S.x.y+COLUSA+COLNUSA+DUMEGY+DUMISR+Musl+Romcath+Hindu+DUM70+DUM75+DUM80+DUM85+DUM90
, data=mi(adunvtt1,adunvtt2,adunvtt3,adunvtt4,adunvtt5),  model  =  "ls", method= "vcovHC")

zus4.out  <-  zelig(log(ODAUSAP1)~-1+LNRGDPPC+OPEN+
 GASPOLr+K.x.x+COLUSA+COLNUSA+DUMEGY+DUMISR+Musl+Romcath+Hindu+DUM70+DUM75+DUM80+DUM85+DUM90
, data=mi(adunvtt1,adunvtt2,adunvtt3,adunvtt4,adunvtt5),  model  =  "ls", method= "vcovHC")

zus5.out  <-  zelig(log(ODAUSAP1)~-1+LNRGDPPC+OPEN+
 GASPOLr+K.x.y+COLUSA+COLNUSA+DUMEGY+DUMISR+Musl+Romcath+Hindu+DUM70+DUM75+DUM80+DUM85+DUM90
, data=mi(adunvtt1,adunvtt2,adunvtt3,adunvtt4,adunvtt5),  model  =  "ls", method= "vcovHC")

zus.outo<-zus1.out

for (i in 1: length(zus.outo$result[1]$coefficients)){
zus.outo$result[1]$coefficients[i]<-c(1.84
,1.30 ,0.57,0.06 ,0.39,0.08,40.09 ,5.04,0.01 ,0.01,-0.00,NA,NA,NA,NA,NA)[i]
}
summary(zus.outo)
summary(zus1.out)
summary(zus2.out)
summary(zus3.out)
summary(zus4.out)
summary(zus5.out)



#Table A7: Replication of Alesina and Dollar (2000), total bilateral aid (other chance-corrected indices I, with non-recorded votes, linear regression with White robust standard errors)

### same for Scott's P and uniform marginals for appendix
 z.out  <-  zelig(LNOECD~-1+LNRGDPPC+LNRGDPPC.1+LNPOP+LNPOPSQ+OPEN+
 GASPOLr+FRUSA+FRJPN+LNCOLS+DUMEGY+DUMISR+Musl+Romcath+Hindu+DUM70+DUM75+DUM80+DUM85+DUM90
, data=mi(adunvtt1,adunvtt2,adunvtt3,adunvtt4,adunvtt5),  model  =  "ls", method= "vcovHC")

 z2.out  <-  zelig(LNOECD~-1+LNRGDPPC+LNRGDPPC.1+LNPOP+LNPOPSQ+OPEN+
 GASPOLr+P.x.x+P.y.x+LNCOLS+DUMEGY+DUMISR+Musl+Romcath+Hindu+DUM70+DUM75+DUM80+DUM85+DUM90
, data=mi(adunvtt1,adunvtt2,adunvtt3,adunvtt4,adunvtt5),  model  =  "ls", method= "vcovHC")

 z3.out  <-  zelig(LNOECD~-1+LNRGDPPC+LNRGDPPC.1+LNPOP+LNPOPSQ+OPEN+
 GASPOLr+P.x.y+P.y.y+LNCOLS+DUMEGY+DUMISR+Musl+Romcath+Hindu+DUM70+DUM75+DUM80+DUM85+DUM90
, data=mi(adunvtt1,adunvtt2,adunvtt3,adunvtt4,adunvtt5),  model  =  "ls", method= "vcovHC")

 z4.out  <-  zelig(LNOECD~-1+LNRGDPPC+LNRGDPPC.1+LNPOP+LNPOPSQ+OPEN+
 GASPOLr+U.x.x+U.y.x+LNCOLS+DUMEGY+DUMISR+Musl+Romcath+Hindu+DUM70+DUM75+DUM80+DUM85+DUM90
, data=mi(adunvtt1,adunvtt2,adunvtt3,adunvtt4,adunvtt5),  model  =  "ls", method= "vcovHC")

 z5.out  <-  zelig(LNOECD~-1+LNRGDPPC+LNRGDPPC.1+LNPOP+LNPOPSQ+OPEN+
 GASPOLr+U.x.y+U.y.y+LNCOLS+DUMEGY+DUMISR+Musl+Romcath+Hindu+DUM70+DUM75+DUM80+DUM85+DUM90
, data=mi(adunvtt1,adunvtt2,adunvtt3,adunvtt4,adunvtt5),  model  =  "ls", method= "vcovHC")

z.outo<-z.out

for (i in 1: length(z.outo$result[1]$coefficients)){
z.outo$result[1]$coefficients[i]<-c(6.563,-0.491,1.568,-0.035,0.383,0.142,-0.006,0.153,
 0.291,1.545,6.473,-0.001,0.001,-0.009,NA,NA,NA,NA,NA)[i]
}
summary(z.outo,z.out,z2.out,z4.out,z3.out,z5.out,digits=3)

summary(z.out)
summary(z2.out)
summary(z3.out)
summary(z4.out)
summary(z5.out)


z.outo<-z.out

for (i in 1: length(z.outo$result[1]$coefficients)){
z.outo$result[1]$coefficients[i]<-c(6.563,-0.491,1.568,-0.035,0.383,0.142,-0.006,0.153,
 0.291,1.545,6.473,-0.001,0.001,-0.009,NA,NA,NA,NA,NA)[i]
}

#Table A8: Replication of Alesina and Dollar (2000), total bilateral aid IV (other chance-corrected indices II, with non-recorded votes, linear regression with White robust standard errors)

 z.out  <-  zelig(LNOECD~-1+LNRGDPPC+LNRGDPPC.1+LNPOP+LNPOPSQ+OPEN+
 GASPOLr+FRUSA+FRJPN+LNCOLS+DUMEGY+DUMISR+Musl+Romcath+Hindu+DUM70+DUM75+DUM80+DUM85+DUM90
, data=mi(adunvtt1,adunvtt2,adunvtt3,adunvtt4,adunvtt5),  model  =  "ls", method= "vcovHC")

 z2.out  <-  zelig(LNOECD~-1+LNRGDPPC+LNRGDPPC.1+LNPOP+LNPOPSQ+OPEN+
 GASPOLr+C.x.x+C.y.x+LNCOLS+DUMEGY+DUMISR+Musl+Romcath+Hindu+DUM70+DUM75+DUM80+DUM85+DUM90
, data=mi(adunvtt1,adunvtt2,adunvtt3,adunvtt4,adunvtt5),  model  =  "ls", method= "vcovHC")

 z3.out  <-  zelig(LNOECD~-1+LNRGDPPC+LNRGDPPC.1+LNPOP+LNPOPSQ+OPEN+
 GASPOLr+C.x.y+C.y.y+LNCOLS+DUMEGY+DUMISR+Musl+Romcath+Hindu+DUM70+DUM75+DUM80+DUM85+DUM90
, data=mi(adunvtt1,adunvtt2,adunvtt3,adunvtt4,adunvtt5),  model  =  "ls", method= "vcovHC")

 z4.out  <-  zelig(LNOECD~-1+LNRGDPPC+LNRGDPPC.1+LNPOP+LNPOPSQ+OPEN+
 GASPOLr+R.x.x+R.y.x+LNCOLS+DUMEGY+DUMISR+Musl+Romcath+Hindu+DUM70+DUM75+DUM80+DUM85+DUM90
, data=mi(adunvtt1,adunvtt2,adunvtt3,adunvtt4,adunvtt5),  model  =  "ls", method= "vcovHC")

 z5.out  <-  zelig(LNOECD~-1+LNRGDPPC+LNRGDPPC.1+LNPOP+LNPOPSQ+OPEN+
 GASPOLr+R.x.y+R.y.y+LNCOLS+DUMEGY+DUMISR+Musl+Romcath+Hindu+DUM70+DUM75+DUM80+DUM85+DUM90
, data=mi(adunvtt1,adunvtt2,adunvtt3,adunvtt4,adunvtt5),  model  =  "ls", method= "vcovHC")

z.outo<-z.out

for (i in 1: length(z.outo$result[1]$coefficients)){
z.outo$result[1]$coefficients[i]<-c(6.563,-0.491,1.568,-0.035,0.383,0.142,-0.006,0.153,
 0.291,1.545,6.473,-0.001,0.001,-0.009,NA,NA,NA,NA,NA)[i]
}
summary(z.outo,z.out,z2.out,z4.out,z3.out,z5.out,digits=3)

summary(z.out)
summary(z2.out)
summary(z3.out)
summary(z4.out)
summary(z5.out)


